Gesture Recognizer
Gesture recognizers translate user input event streams into higher level actions. A gesture recognizer is associated with an event target, which dispatches mouse and keyboard events to the gesture recognizer. When a gesture recognizer has received enough information from the event stream to interpret the action, it calls its callback functions. Callback functions may be specified at construction or added to the gestureCallbacks list after construction.
Inheritors
Properties
The list of functions to call when this gesture is recognized. The functions have a single argument: this gesture recognizer, e.g., gestureCallback(recognizer). Applications may add functions to this array or remove them.
Indicates the currently pressed mouse buttons as a bitmask. A value of 0 indicates that no buttons are pressed. A nonzero value indicates that one or more buttons are pressed as follows: bit 1 indicates the primary button, bit 2 indicates the auxiliary button, bit 3 indicates the secondary button.
Indicates the document element this gesture recognizer observes for mouse and touch events.
Indicates the number of active touches.
Indicates this gesture's translation along the X axis since the gesture started.
Indicates this gesture's translation along the Y axis since the gesture started.
Functions
Registers a gesture state listener on this GestureRecognizer. Registering state listeners using this function enables applications to receive notifications of gesture recognition.
Removes a gesture state listener from this GestureRecognizer. The listener must be the same object passed to addListener. Calling removeListener with arguments that do not identify a currently registered listener has no effect.